package com.memorypalace.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class PageBean implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer curPage = 1;  //当前第几页
	private Integer pageCount = 10;//每页多少条
	private Integer recordNum = 0;//一共多少数据
	private Integer totalPage = 0;//总页数
	private List data = new ArrayList();		  //每页的数据
	public Integer getCurPage() {
		return curPage;
	}
	public void setCurPage(Integer curPage) {
		this.curPage = curPage;
	}
	public Integer getPageCount() {
		return pageCount;
	}
	public void setPageCount(Integer pageCount) {
		this.pageCount = pageCount;
	}
	public Integer getRecordNum() {
		return recordNum;
	}
	public void setRecordNum(Integer recordNum) {
		this.recordNum = recordNum;
		
		
		if(this.recordNum%this.getPageCount()==0){
			this.totalPage = this.recordNum/this.getPageCount();
		}else{
			this.totalPage = this.recordNum/this.getPageCount()+1;
		}
		
	}
	public Integer getTotalPage() {
		return totalPage;
	}
	
	// ???? 为啥要注视掉
//	public void setTotalPage(Integer totalPage) {
//		this.totalPage = totalPage;
//	}
	public List getData() {
		return data;
	}
	public void setData(List data) {
		this.data = data;
	}
	@Override
	public String toString() {
		return "PageBean [curPage=" + curPage + ", pageCount=" + pageCount + ", recordNum=" + recordNum + ", totalPage="
				+ totalPage + ", data=" + data + "]";
	}
	
	
	

}
